# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-class-methodmaker
pkgver=2.24
pkgrel=12
pkgdesc="Create generic class methods"
arch=('loong64' 'x86_64')
url="https://search.cpan.org/dist/Class-MethodMaker"
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/S/SC/SCHWIGON/class-methodmaker/Class-MethodMaker-${pkgver}.tar.gz")
sha256sums=('5eef58ccb27ebd01bcde5b14bcc553b5347a0699e5c3e921c7780c3526890328')

build() {
  cd  "$srcdir"/Class-MethodMaker-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor 
  make
}

package() {
  cd  "$srcdir"/Class-MethodMaker-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
